package com.example.springboot_demo.controller;

import cn.hutool.Hutool;
import cn.hutool.http.HttpUtil;
import com.example.springboot_demo.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@RestController
public class SampleController {
    @RequestMapping("/metrics")
    @ResponseBody
    public void endpoint(HttpServletResponse response) throws IOException {
//        final String metrics = HttpUtil.get("http://127.0.0.1:5557/metrics");
//        response.setHeader("Content-Type", "text/plain; version=0.0.4; charset=utf-8");
//        response.getOutputStream().print(metrics);

    }
}
